﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XCommunity.Users;

namespace XCommunity.Forums
{


  /// <summary>
  /// 定义一个版主（版面管理员）
  /// </summary>
  public interface IModerator
  {
    ForumsBoardFrame Jurisdiction { get; }
    IControlItem[] Permissions { get; }
    string Username { get; }
  }

  /// <summary>
  /// IModerator的标准实现
  /// </summary>
  internal class Moderator : IModerator
  {

    internal Moderator( string username, ForumsBoardFrame jurisdiction, IControlItem[] permissions )
    {
      Username = username;
      Jurisdiction = jurisdiction;
      Permissions = permissions;
    }


    /// <summary>
    /// 用户名
    /// </summary>
    public string Username
    {
      get;
      private set;
    }


    /// <summary>
    /// 所辖板块
    /// </summary>
    public ForumsBoardFrame Jurisdiction
    {
      get;
      private set;
    }


    /// <summary>
    /// 拥有的管理权限
    /// </summary>
    public IControlItem[] Permissions
    {
      get;
      private set;
    }

  }
}
